const mongoose = require('mongoose');
const itemSchema = new mongoose.Schema({
  name: {
    type: String,
    required: true
  },
  price: {
    type: Number,
    required: true
  },
  desc: String,
  thumb: String,
  // 销量
  sales: {
    type: Number,
    default: 0
  },
  createAt: {
    type: String,
    required: true
  },
  content: String  // 详情
})

const itemModel = mongoose.model('qf_items', itemSchema);

module.exports = itemModel;